﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;

namespace HospitalTracking.Model
{
    [Serializable]
    public class Hospital : ObservableObject
    {
        public const string NamePropertyName = "Name";

        private string _Name = string.Empty;

        public string Name
        {
            get { return _Name; }
            set
            {
                if (_Name != value)
                {
                    _Name = value;
                    RaisePropertyChanged(NamePropertyName);
                }
            }
        }

        public const string DepartmentsPropertyName = "Departments";

        private ObservableCollection<Department> _Departments;

        

        public ObservableCollection<Department> Departments
        {
            get { return _Departments; }
            set
            {
                if (_Departments != value)
                {
                    _Departments = value;
                    RaisePropertyChanged(DepartmentsPropertyName);
                }
            }
        }


        public Hospital(string name, ObservableCollection<Department> departments)
        {
            // TODO: Complete member initialization
            this.Name = name;
            this.Departments = departments;
        }
    }
}
